{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<a href=\"https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv\" target=\"_blank\"><img align=\"left\" src=\"data/cover.jpg\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n",
    "*This notebook contains an excerpt from the book [Machine Learning for OpenCV](https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv) by Michael Beyeler.\n",
    "The code is released under the [MIT license](https://opensource.org/licenses/MIT),\n",
    "and is available on [GitHub](https://github.com/mbeyeler/opencv-machine-learning).*\n",
    "\n",
    "*Note that this excerpt contains only the raw code - the book is rich with additional explanations and illustrations.\n",
    "If you find this content useful, please consider supporting the work by\n",
    "[buying the book](https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv)!*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "<!--NAVIGATION-->\n",
    "< [Using Decision Trees for Regression](05.03-Using-Decision-Trees-for-Regression.ipynb) | [Contents](../README.md) | [Implementing Our First Support Vector Machine](06.01-Implementing-Your-First-Support-Vector-Machine.ipynb) >"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# Detecting Pedestrians with Support Vector Machines\n",
    "\n",
    "In the previous chapter, we talked about how to use decision trees for classification and\n",
    "regression. In this chapter, we want to direct our attention to another well established\n",
    "supervised learner in the machine learning world: **support vector machines (SVMs)**.\n",
    "\n",
    "Soon after their introduction in the early 1990, SVMs quickly became popular in the\n",
    "machine learning community, largely because of their success in early **handwritten digit\n",
    "classification**. They remain relevant to this day, especially in application domains, such as\n",
    "computer vision.\n",
    "\n",
    "The goal of this chapter is to apply SVMs to a popular problem in computer vision:\n",
    "**pedestrian detection**. In contrast to a recognition task (where we name the category of an\n",
    "object), the goal of a detection task is to say whether a particular object (or in our case, a\n",
    "pedestrian) is present in an image or not.\n",
    "\n",
    "You might already know that OpenCV can do this in two to three lines of code. But, we\n",
    "won't learn anything if we do it that way. So instead, we'll build the whole pipeline from\n",
    "scratch! We will obtain a real-world dataset, perform feature extraction using the **histogram\n",
    "of oriented gradients (HOG)**, and apply an SVM to it.\n",
    "\n",
    "Along the way, we want to address the following questions:\n",
    "- How do we implement SVMs in OpenCV with Python, and how do they work?\n",
    "- What's the deal with decision boundaries, and why are SVMs also called maximum-margin classifiers?\n",
    "- What is the kernel trick, and how do we put it into practice?\n",
    "\n",
    "## Outline\n",
    "- [Implementing Your First Support Vector Machine](06.01-Implementing-Your-First-Support-Vector-Machine.ipynb)\n",
    "- [Detecting Pedestrians in the Wild](06.02-Detecting-Pedestrians-in-the-Wild.ipynb)\n",
    "- [Additional SVM Exercises](06.03-Additional-SVM-Exercises.ipynb)\n",
    "\n",
    "Excited? Then let's go!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "<!--NAVIGATION-->\n",
    "< [Using Decision Trees for Regression](05.03-Using-Decision-Trees-for-Regression.ipynb) | [Contents](../README.md) | [Implementing Our First Support Vector Machine](06.01-Implementing-Your-First-Support-Vector-Machine.ipynb) >"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
